/************************************************************************
 * <br>
 * <ul>
 * <li>版权所有：唐山弘川科技有限公司 2009－2020</li>
 * <li>创建日期：2009-8-12</li>
 * <li>初始作者：刘川</li>
 * </ul>
 * <ul>
 * <b>修订历史</b>
 * <li>1、</li>
 * </ul>
 ***********************************************************************/
package com.hy.erp.inventory.pojo ;


import javax.persistence.Column ;
import javax.persistence.Entity ;
import javax.persistence.FetchType ;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne ;
import javax.persistence.PrimaryKeyJoinColumn ;
import javax.persistence.Table ;

import org.hibernate.annotations.Index ;

import com.hy.erp.inventory.dao.interfaces.IAddressDao;
import com.hy.erp.inventory.pojo.interfaces.IAddress;
//import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.api.annotation.DaoA;
//import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.entity.AbstractPersistentEntity;
import com.hy.mydesktop.shared.persistence.domain.gxt.MyBaseModel;
/**
 * 
 * <ul>
 * <li>开发作者：李冰</li>
 * <li>设计日期：2010-10-5；时间：上午10:25:17</li>
 * <li>类型名称：Address</li>
 * <li>设计目的：地址</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
//@Name("address")
//@Entity 
//@Table(name="address")
//@DaoA(IAddressDao.class)

public class Address extends MyBaseModel //implements IPositonType
//public class Address extends AbstractPersistentEntity  implements IAddress
{
	private static final long	serialVersionUID	=
	                                                  5449322077787919371L ;

	

	 

	@ Column ( name = "abbreviation" , length = 50)
	@ Index ( name = "abbreviationIndex" )
	public String getAbbreviation ( )
	{
		return IAddress .ABBREVIATION;
	}

	public void setAbbreviation (
									String abbreviation )
	{super.set ( IAddress.ABBREVIATION , abbreviation );
	}
	
	

	@ Column ( name = "exactAddress" , length = 50)
	@ Index ( name = "exactAddressIndex" )
	public String getExactAddress ( )
	{
		return IAddress .EXACT_ADDRESS;
	}

	public void setExactAddress (
									String exactAddress )
	{super.set ( IAddress.EXACT_ADDRESS , exactAddress );
	}
	
	
	
	
	@ Column ( name = "ancillaryCode" , length = 50)
	@ Index ( name = "ancillaryCodeIndex" )
	public String getAncillaryCode ( )
	{
		return IAddress.ANCILLARYCODE ;
	}

	public void setAncillaryCode (
									String ancillaryCode )
	{
	}
	
	//@OneToOne ( targetEntity = City.class , fetch = FetchType.LAZY )
	//@ PrimaryKeyJoinColumn
	@ManyToOne
	@JoinColumn(name="city_identifier")
	public City getCity ( )
	{
		return this.get(IAddress.CITY) ;
	}

	public void setCity (
							City city )
	{
		super.set ( IAddress.CITY , city );
	}
	
	
	@ Column ( name = "description" , length = 50)
	@ Index ( name = "descriptionIndex" )
	public String getDescription ( )
	{
		return this.get (IAddress.DESCRIPTION) ;
	}

	public void setDescription (
									String description )
	{
		super.set ( IAddress.DESCRIPTION , description );
	}
	@ Column ( name = "name" , length = 50)
	@ Index ( name = "nameIndex" )
	public String getName ( )
	{
		return IAddress.NAME ;
	}

	public void setName (
							String name )
	{	super.set ( IAddress.NAME , name );
	}
	@ Column ( name = "namedCode" , length = 50)
	@ Index ( name = "namedCodeIndex" )
	public String getNamedCode ( )
	{
		return IAddress.NAMECODE ;
	}

	public void setNamedCode (
								String namedCode )
	{	super.set ( IAddress.NAMECODE , namedCode );
	}
	//@OneToOne ( targetEntity = Province.class , fetch = FetchType.LAZY )
	//@ PrimaryKeyJoinColumn
	@ManyToOne
	@JoinColumn(name="Province_identifier")
	public Province getProvince ( )
	{
		return this.get(IAddress.PROVINCE) ;
	}

	public void setProvince (
								Province province )
	{
		super.set ( IAddress.PROVINCE , province );
	}



	/*@OneToOne ( targetEntity = Area.class , fetch = FetchType.LAZY )
	@ PrimaryKeyJoinColumn
	public Area getArea ( )
	{
		return this.get(IAddress.AREA) ;
	}

	public void setArea (
							Area area )
	{
		super.set ( IAddress.AREA , area );
	}
	
	@OneToOne ( targetEntity = Country.class , fetch = FetchType.LAZY )
	@ PrimaryKeyJoinColumn
	public Country getCountry ( )
	{
		return this.get(IAddress.COUNTRY) ;
	}

	public void setCountry (
								Country country )
	{	super.set ( IAddress.COUNTRY , country );
	}
	


@OneToOne ( targetEntity = County.class , fetch = FetchType.LAZY )
	@ PrimaryKeyJoinColumn
	public County getCounty ( )
	{
		return this.get(IAddress.COUNTY) ;
	}

	public void setCounty (
							County county )
	{	super.set ( IAddress.COUNTY , county );
	}
	*/
	

	




	
	


}
